<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
        //Set Application Language
        'language'=>'he',

        // preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'application.modules.grbac.models.Users',
		'application.modules.srbac.models.Assignments', //Used by grbac
                'application.modules.srbac.controllers.SBaseController',
	),

	//modules
	'modules'=>array(
            'srbac' => array(
                'userclass'=>'Users',
                'userid'=>'id',
                'username'=>'username',
                'debug'=>false,
                'pageSize'=>10,
                'superUser' =>'Athority',
                            'css'=>'srbac.css',
                'layout'=>'application.views.layouts.main',
                    'notAuthorizedView'=>'application.views.error.unauthorized',
                'alwaysAllowed'=>'gui',
                 'userActions'=>array('Show','View','List'),
                'listBoxNumberOfLines' => 15,
                'imagesPack'=>'noia',
                'iconText'=>true,
                  ),
            'grbac'=>array(
                 'defaultRole'=> 'Student'
                 ,'hashAlgo'=>'sha256'
                 ,'enableRegistration' => true     // disable registration
                 ,'enableRemember'     => true
                 ,'durationRemember'   => 30       // in days
                 ,'emailConfirmation'  => false
                 ,'emailFrom'          => 'admin@dd.com'
             ),
   	), // End Modules

	// application components
	'components'=>array(
            'urlManager'=>array(
                'urlFormat'=>'path',
                'showScriptName'=>false,
            ),

            'authManager'=>array(
                'class'=>'CDbAuthManager'
                ,'connectionID'=>'db'
                ,'itemTable'=>'items'
                ,'assignmentTable'=>'assignments'
                ,'itemChildTable'=>'itemchildren'
            ),

            'user'=>array(
                // enable cookie-based authentication
                'allowAutoLogin'=>true
                ,'loginUrl'=>array('/grbac/authenticate/login'),
            ),
            'errorHandler'=>array(
                 // use 'site/error' action to display errors
                'errorAction'=>'site/error',
            ),
		
	), // end components
);